Method for streaming packet captures from network access devices to a cloud server over http

ABSTRACT

A system for streaming packet captures over the Internet includes multiple network access devices, each operating as one of a gateway device, a wireless access point, and a network switch, and a management server communicatively coupled to the network access devices over the Internet for managing the network access devices. The management server maintains a persistent hypertext transport protocol (HTTP) connection with each of the network access devices over the Internet. The management server is to generate a bytecode based on a filtering expression for packet captures (PCAPs) representing one or more PCAPs filtering rules, transmit the bytecode to the network access devices without requiring the network access devices to compile the PCAPs filtering rules, receive PCAPs from the network access devices captured by the network access devices based on the PCAPs filtering rules, and merge the PCAPs received from the network access devices into merged PCAPs.

FIELD OF THE INVENTION

Embodiments of the present invention relate generally to packet capturing. More particularly, embodiments of the invention relate to streaming packet captures from network access devices to a cloud server over HTTP.

BACKGROUND

Packet capture (PCAP) is the act of capturing data packets crossing a computer network. Deep packet capture (DPC) is the act of capturing, at full network speed, complete network packets (e.g., header and payload) crossing a network with a high traffic rate. Once captured and stored, either in short-term memory or long-term storage, software tools can perform deep packet inspection (DPI) to review network packet data, perform forensics analysis to uncover the root cause of network problems, identify security threats, and ensure data communications and network usage complies with outlined policy. Some DPCs can be coupled with DPI and can as a result manage, inspect, and analyze all network traffic in real-time at wire speeds while keeping a historical archive of all network traffic for further analysis.

Typically, in order to configure a network device to perform PCAPs, one has to set up certain PCAP rules. Traditionally, setting up a remote packet capture is a manually intensive process that can only be run on the network devices with enough resources (e.g., CPU, memory, and storage) to do all the filtering and store the results on the machine where the PCAP is taking place. For example, an administrator must log into the device; the device must have a program to execute the packet capture; it must run the capture and store the results locally; and then, via a separate process, one must transfer the results (which may be large) from the remote device to a local device for additional analysis.

This may be difficult or impossible if the device does not have enough disk space to store the capture or the device is not remotely accessible. If one wants to run this process across multiple devices, for instance capturing across multiple access points (APs), she must repeat every step and then try to merge the results together. Finally, this process does not take place over a standard service, so accessing from remote devices may be difficult.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.

FIG. 1 is a block diagram illustrating a cloud managed network system according to one embodiment of the invention.

FIG. 2 is a block diagram illustrating a block diagram of a management server according to one embodiment of the invention.

FIG. 3 is a block diagram illustrating an example of a network access device according to one embodiment of the invention.

FIG. 4 is a block diagram illustrating an example of a management server according to another embodiment of the invention.

FIG. 5 is a block diagram illustrating an example of an HTTP stream according to one embodiment of the invention.

FIG. 6 is a flow diagram illustrating a method for packet captures according to one embodiment of the invention.

FIG. 7 is a flow diagram illustrating a method for packet captures according to one embodiment of the invention.

FIGS. 8A and 8B are block diagrams illustrating a cloud managed network configuration according to some embodiments of the invention.

FIG. 9 is a block diagram illustrating a network configuration in accordance with another embodiment of the invention.

DETAILED DESCRIPTION

Various embodiments and aspects of the inventions will be described with reference to details discussed below, and the accompanying drawings will illustrate the various embodiments. The following description and drawings are illustrative of the invention and are not to be construed as limiting the invention. Numerous specific details are described to provide a thorough understanding of various embodiments of the present invention. However, in certain instances, well-known or conventional details are not described in order to provide a concise discussion of embodiments of the present inventions.

Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in conjunction with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification do not necessarily all refer to the same embodiment.

According to some embodiments, a centralized backend server (e.g., Web-based or cloud-based management server) maintains a persistent network connection such as a hypertext transport protocol (HTTP) connection with each of packet capturing devices. A network access device can be one of a gateway device, an access point (AP), and a network switch, which provides network access to one or more client devices over a local area network (LAN). In one embodiment, a management server presents a Web interface that has the same inputs as traditional packet captures, allowing a user to select which remote devices to run the capture on and start a packet capture session. In one embodiment, the management server receives one or more expressions, such as a TCPDUMP expression, from the Web interface for packet captures in one or more of the network access devices. The management server compiles the expressions into bytecode that is platform independent and allows the capture devices themselves to do filtering without having them to be capable of translating expressions into bytecode. Alternatively, the expressions or information representing filtering rules can be transmitted from the management server to at least some of the network access devices. The network access devices can then compile the received information into a set of one or more filtering rules for packet capturing. Each of the network access devices maintains a management tunnel (mTunnel) with the management server so that a management server can connect to the network access devices, for example, for distributing packet capturing information and/or reporting captured packets.

In one embodiment, each of the network access devices that perform packet capture includes a HTTP server component running therein that uses HTTP-chunking to stream captured information of packets to a HTTP client component running within the management server. The management server creates a process that initiates an HTTP connection to each capture device which streams results back and merges multiple PCAP streams together to a merged stream, including reordering and/or deduplicating the PCAP packets. The server component of a network access device streams the results of the process over a HTTP-chunked connection that will work over a standard Web server. In one embodiment, the management server parses the output and streams an output such as a TCPDUMP text output to the user over a Web service.

FIG. 1 is a block diagram illustrating a cloud-managed network system according to one embodiment of the invention. Referring to FIG. 1, system 100 includes, but is not limited to, various network access devices (NADs) 102-103 (which may be wired and/or wireless) managed by a management server (MS) 101 over WAN 104, where WAN 104 may be the Internet. Management server 101 may be a Web or cloud server, or a cluster of servers, running on server hardware. Each of network access devices 102-103 is associated with a LAN such as LANs 105-106. Network access devices 102-103 may operate as a gateway device, an access point (AP), a network switch, or a combination thereof to LANs 105-106, respectively, where various client devices 108-109 can be communicatively coupled to LANs 105-106. Any of network access devices 102-103 may be located behind another network access device. Network access devices 102-103 may be associated or owned by a network owner or operator (e.g., corporation, enterprise) and managed via management server 101. Note that for the purpose of illustration, although network access device 103 is not shown with details therein, network access device 103 has the same or similar architecture as network access device 102. For the purpose of illustration, only two network access devices are shown. However, it is not so limited; additional network access devices may be coupled to network 104 and managed by management server 101.

According to one embodiment, network access devices 102-103 may represent “capture devices” that a network operator (e.g., administrator 107) wishes to capture packets from. Each of network access devices 102-103 is connected to management server 101 (e.g., backend system) via an Internet protocol (IP) tunnel referred to herein as an “mTunnel.” Each capture device runs a Web service that a program can connect to over an mTunnel. A user connects to a “Web service” which can run programs that can access devices over the mTunnel. When the user selects to run a packet capture, the Web service connects to a program that streams from multiple capture devices (e.g., network access devices 102-103) to aggregate multiple streams into one that it itself streams back to the end user, either via an update to a Web interface or via a download.

Referring back to FIG. 1, in one embodiment, management server 101 includes Web interface 111 to allow a user such as administrator 107 to access resources of management server such as management tools for managing network access devices 102-103. Via Web interface 111, user 107 can provide, via path 131, PCAP configuration information regarding how PCAPs are to be performed. Based on the PCAP configuration information, capture filtering rule generator 112 is to compile and generate bytecode representing one or more capture filtering rules 113. Capture filtering rules 113 are then downloaded to any of network access devices 102-103, for example, as part of capture filtering rules 124. In one embodiment, as part of PCAP configuration information, user 107 may specify via Web interface 111 which of network access devices 102-103 will receive the capture filtering rules 113.

A conventional system requires user 107 to individually log into each of the network access devices that perform the packet captures to specify the PCAP configuration. Such a manual process is tedious and error prone. In one embodiment, by compiling the PCAP configuration information into bytecode representing the PCAP filtering rules, the network access devices do not need the processing resources that are required to compile the same filtering rules. Since the typical bytecode is much smaller in size (e.g., around 20 bytes) compared to a typical HTTP expression that sets up the filtering rules, it takes much less resource or bandwidth to transmit from management server 101 to network access devices 102-103 and it takes less processing resource in the network access devices to execute the bytecode.

According to another embodiment, a network access device may have enough processing power or bandwidth to maintain a rule generator such as rule generator 112 to compile the packet capturing information to generate capture filtering rules 124. In such an embodiment, management server 101 receives packet capturing information from user 107 via Web interface 111. User 107 can specify via Web interface 111 which of the network access devices 105-106 would receive the packet capturing information. The capturing information representing filtering rules can be transmitted from the management server 101 to at least some of the network access devices 105-106. The network access devices 105-106 can then compile the received information into a set of one or more filtering rules, such as rules 124, for packet capturing.

According to one embodiment, each of network access devices 102-103 maintains a persistent mTunnel with management server 101. The bytecode representing capture filtering rules 113 is downloaded over the mTunnels to the specified network access devices, in this example, as part of capture filtering rules 124 of network access device 102. The capture filtering rules may be carried by a user datagram protocol (UDP) packet that is encapsulated in another packet and tunneled to network access device 102 such as UDP over IP (UDP/IP) encapsulation or UDP over HTTP (UDP/HTTP) encapsulation. Network access device 102 includes a router 121 to route packets exchanged between its client devices 108 and the Internet 104 via path 133. In addition, network access device 102 includes a capture program 122 (also referred to as a packet analyzer) coupled to router 121 to capture packets or packet information (e.g., parameters) that satisfy capture filtering rules 124. Note that the network access devices 105-106 can capture packets even if those packets are not being routed to or from the Internet via any kind of Layer 3 (i.e., IP layer) routing; the packet capturing can be done at Layer 2 (i.e., media access control or MAC layer). Thus, even when the network access devices 105-106 are operating in a “bridge mode” and not themselves performing any routing at Layer 3, they can still perform packet capturing at Layer 2. Of course, the network access device must themselves have layer 3 connectivity (i.e. an IP address) in order to communicate with the management server 101.

Capture program 122 may be implemented as part of router 121 or a network stack of an operating system of network access device 102. Alternatively, capture program 122 may be a third-party packet capture utility such as TCPDUMP utility. TCPDUMP is a packet analyzer that runs under the command line. It allows the user to intercept and display TCP/IP and other packets being transmitted or received over a network to which the computer is attached. TCPDUMP works on most LINUX operating systems.

According to one embodiment, network access device 102 includes an HTTP server component 123 that is communicatively coupled to HTTP client component 115 of management server 101 to maintain a persistent HTTP connection. The persistent HTTP connection may be part of an mTunnel between management server 101 and network access device 102. HTTP client 115 and HTTP server 123 work with each other to maintain an open HTTP connection. In one embodiment, when network access device 102 powers up and contacts management server 101, HTTP client 115 sends an HTTP request to HTTP server 123. Instead of immediately responding to the HTTP request, HTTP server 123 may withhold the HTTP response until there is data to be sent to management server 101. Alternatively, the initial HTTP request from client 115 to server 123 happens when the administer requests a new PCAP to start, rather than when NAD 102 boots up. The HTTP server 123 receives configuration parameters about the new PCAP (e.g., the byte code for the filtering rules, the duration of the PCAP, maximum number of packets to capture, etc) as HTTP parameters that are part of that initial HTTP fetch. HTTP client 115 would start a new fetch for each PCAP that is requested, rather than immediately starting one once NAD 102 boots up. In one embodiment, when capture program 122 captures the PCAP information based on capture filtering rules 124, the PCAP information is handed over to HTTP server 123. In response, HTTP server 123 transmits the PCAP information as part of a pending HTTP response to HTTP client 115. In one embodiment, once HTTP client 115 receives an HTTP response from HTTP server 123, HTTP client 115 immediately sends another HTTP request to HTTP server 123, which will be withheld to maintain the HTTP connection open.

According to one embodiment, the PCAP information is streamed by HTTP server 123 to HTTP client 115 using HTTP streaming protocols, such as HTTP streaming or HTTP live streaming protocol. HTTP streaming (also referred to as HTTP server push) is a mechanism for sending data from a Web server (e.g., HTTP server) to a Web browser (e.g., HTTP client). Generally the Web server does not terminate a connection after response data has been served to a client. The Web server leaves the connection open so that if an event is received, it can immediately be sent to one or more clients. Otherwise, the data would have to be queued until the client's next request is received. HTTP live streaming (HLS) is an HTTP-based media streaming communications protocol. It works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport stream. Since its requests use only standard HTTP transactions, HTTP live streaming is capable of traversing any firewall or proxy server that lets through standard HTTP traffic, unlike UDP-based protocols.

According to one embodiment, HTTP server 123 of network access device 102 listens for an incoming HTTP connection (e.g., HTTP request) from HTTP client 115 of management server. Once the HTTP connection has been established, capture program 122 starts capturing packet information based on capture filtering rules 124 and streams back via path 134 the capture result to management server 101 via HTTP server 123. In one embodiment, packet capture program 122 selects an interface, a time or packet limit, and loads the byte code 124 into the kernel memory so that capture program 122 will filter and unwanted packets. Alternatively, capture filtering rules 124 and the interface and time/packet limits information used by capture program 122 are provided as part of HTTP parameters in the HTTP fetch from client 115 to server 123. For any packets it reads back it streams to its output, and once the stream ends (or times out) it closes the connection and the stream ends. Similarly, network access device 103 streams the respective capture result to management server 101 via path 135.

When HTTP client 115 collects the HTTP streams from network access devices 102-103, the HTTP streams are handed over to merger 114. The HTTP streams may be temporarily stored in buffer 116 for reordering and/or deduplication purposes. Merger 114 merges, with optional reordering and deduplication, the received HTTP streams into merged PCAP stream 117 to allow user 107 to download it through Web interface 111 via path 132.

FIG. 2 is a block diagram illustrating a block diagram of a management server according to one embodiment of the invention. Referring to FIG. 2, Web interface 111 provides a graphical user interface (GUI) or an application programming interface (API) to allow a user to specify PCAP configuration information. In one embodiment, the PCAP configuration information includes, but is not limited to, capture expression 201, timeout 202, and one or more device identifiers (IDs) 203 that identify one or more network access devices (e.g., network access devices 205) to be configured for PCAPs. For example, expression 201 may identify at least the host address (e.g., Web site) and one or more LAN interfaces and/or ports through which the network access device should monitor and/or capture the packets, such as, for example, “ip dst 10.1.1.1 and port 5555.” The PCAP configuration may be constructed representing a universal resource locator (URL), such as URL 204 that a typical client device may request to access a particular Web resource. The expression 201 may further include an amount of traffic or a period of time during which the network access device should capture. Based on the PCAP configuration information, capture filtering rule generator 112 is to generate one or more bytecodes 113 representing the capture filtering rules. Bytecode 113 is then downloaded to one or more of network access devices 205 that are identified by device IDs 203, where the bytecode may be transmitted via the corresponding mTunnel(s). Alternatively, the PCAP configuration information may be transmitted, via the respective mTunnel, from management server 101 to network access device(s) 205 to allow the network access device(s) 205 to compile the packet capturing rules.

FIG. 3 is a block diagram illustrating an example of a network access device according to one embodiment of the invention. Referring to FIG. 3, after bytecode 124 has been downloaded (or received as part of a HTTP request) from management server 101 via mTunnel 304, bytecode 124 is loaded into a kernel of an operating system (e.g., LINUX) of network access device 102 and utilized by capture program 122 as part of capture filtering rules. In one embodiment, there is a user level program on the network access device which opens a raw socket on the associated network device, and that program attaches the bytecode as a filter on the socket. The operating system provides the facility to do this system call that lets one specify a filter. The end result of this is that the filtering code is loaded into the kernel and used to filter which packets are sent to that socket, and thus which packets are included in the HTTP stream that is sent back from the network access device to the management server.

In one embodiment, capture program 122 communicates with router 121 to monitor certain LAN interfaces such as LAN interfaces 305-307 and capture packets or at least the parameters of the packets exchanged via the selected LAN interfaces based on bytecode 124. Router 121 is responsible for routing packets as part of normal network traffic 302 between client devices associated with LAN interfaces 305-307 and external network node(s) 301 over Internet 104. Any of the LAN interfaces 305-307 may represent physical interfaces such as ports, logical interfaces such as virtual LANs (VLANs), or a combination thereof. Capture program 122 may be implemented as part of router 121, or vice versa. Network access device 102 may be located behind another network access device (e.g., gateway device). According to one embodiment, capture program 122 provides the PCAP information to HTTP server 123. HTTP server 123 then streams the PCAP information 303 to management server 101 via mTunnel 304 using an HTTP streaming protocol. As described above, the packet capturing can be performed at other network layers such as Layer 2.

FIG. 4 is a block diagram illustrating an example of a management server according to another embodiment of the invention. Referring to FIG. 4, after HTTP client 155 receives HTTP streams from network access devices 401-403, the HTTP streams are temporarily stored in buffer or queue 116 as part of HTTP streams 407-408. Network access devices 401-403 may represent any of network access devices 102-103 of FIG. 1. Merger 114 is to merge HTTP streams 407-408 into merged HTTP stream 117. In one embodiment, merger 114 includes a reordering module 404 to reorder the packets in HTTP streams 407-408 based on a variety of categories during merging the HTTP streams. In one embodiment, HTTP streams may be reordered based on a timestamp associated with the individual HTTP streams. Alternatively, packets or segments within a particular HTTP stream may also be reordered according to the timestamps of the packets or segments and/or in view of other packets or segments of other HTTP streams.

In addition, according to one embodiment, merger 114 includes a deduplication module 405 to remove any deduplicated stream and/or packets or segments within a stream. In one embodiment, for each packet/segment or stream in merged stream 117, a hash of the content is generated using a predetermined hash function (e.g., SHA-1, MD5) and maintained as part of hashes 406. For a new packet or segment, a new hash is generated and compared with the hashes 406 to determine whether the packet or segment has already been stored in merged stream 117. If the new hash matches one of the hashes 406, it means more likely than not that the corresponding packet/segment exists in merged stream 117. Thus, instead of storing the duplicated packet/segment in merged stream 117 again, the duplicated packet/segment may be dropped or ignored. According to one embodiment, merger 114 further includes a decoder (not shown) that, rather than streaming back the actual packet contents, the decoder interprets and decodes the content and streams back a human-readable text summary of each packet.

FIG. 5 is a block diagram illustrating an example of an HTTP stream according to one embodiment of the invention. Referring to FIG. 5, HTTP stream 500 may represent any of HTTP streams 117 and 407-408 of FIG. 4. In one embodiment, HTTP stream 500 includes a PCAP header 501 and one or more packets 502-504. PCAP header 501 further includes a timestamp indicating the time when the current PCAP session was started by the network access device. Each packet includes timestamp 506, length 507, and payload 508. Timestamp 506 indicates the time when the corresponding packet was captured by the network access device. Length 507 specifies the size of payload 508. Based on timestamps 505 and 506, reordering module 404 can reorder the streams received from multiple network access devices and/or packets within the streams.

FIG. 6 is a flow diagram illustrating a method for packet captures according to one embodiment of the invention. Method 600 may be performed by processing logic, which may include software, hardware, or a combination thereof. For example, method 600 may be performed by management server 101 of FIG. 1. Referring to FIG. 6, at block 601, processing logic receives PCAP configuration information (e.g., expression, device ID, timeout) via a Web interface for configuring PCAP of a network access device. At block 602, processing logic generates bytecode based on the PCAP configuration information, where the bytecode represents one or more PCAP filtering rules. At block 603, the bytecode is transmitted to a network access device over the Internet without requiring the network access device to compile the PCAP filtering rules. Subsequently, at block 604, processing logic receives PCAPs using an HTTP streaming protocol from the network access device, where the PCAPs were captured by the network access device based on the downloaded PCAP filtering rules. At block 605, processing logic merges, with optional reordering and deduplication, the PCAPs with other network access devices. Alternatively, the PCAP configuration information may be transmitted, via the respective mTunnel, from the management server to the network access device(s) to allow the network access device(s) to compile the packet capturing rules (e.g., bytecode).

FIG. 7 is a flow diagram illustrating a method for packet captures according to one embodiment of the invention. Method 700 may be performed by processing logic, which may include software, hardware, or a combination thereof. For example, method 700 may be performed by any of network access devices 102-103 of FIG. 1. Referring to FIG. 7, at block 701, processing logic downloads bytecode from a management server over the Internet, where the bytecode represents one or more PCAP filtering rules. At block 702, processing logic maintains an HTTP connection with the management server. At block 703, processing logic captures packet information of packets associated with one or more LAN client devices based on the bytecode. At block 704, the captured information is streamed to the management server over the HTTP connection using an HTTP streaming protocol. Alternatively, the network access device downloads the PCAP configuration from the management server and compiles the PCAP configuration into a set of one or more packet capturing filtering rules.

FIG. 8A is a block diagram illustrating a cloud managed network system according to one embodiment of the invention. System 1000A may be implemented as part of any of the network systems described above, such as system 100 of FIG. 1. Referring to FIG. 10A, system 1000A includes, but is not limited to, various network access devices (NADs) 1002-1003 managed by a management server 1001 over WAN 1004. Management server 1001 may be a Web or cloud server, or a cluster of servers, running on server hardware. Each of network access devices 1002-1003 may be associated with a LAN such as LANs 1005-1006. A LAN herein may also refer to a sub-network or network segment (e.g., subnet or a virtual LAN (VLAN)) of a larger LAN (e.g., Intranet). Network 1004 may be the Internet. Any of network access devices 1002-1003 may operate as a gateway device (e.g., routers 1016 and 1019), an access point (AP) (e.g., APs 1017 and 1020), a network switch (e.g., switches 1015 and 1018), or a combination thereof to LANs 105-106, wired or wireless, where various network client devices (NCDs) 1008-1009, also referred to as LAN devices, can be communicatively coupled to LANs 105-106.

According to one embodiment, a network access device may represent a gateway device interfacing a LAN to WAN 1004 and performs network address translation (NAT) for its clients, which may be client devices 1008-1009 or other network access devices. A network access device may be configured behind another network access device. For example, an uplink of an access point may be coupled to a downlink of a gateway device. Alternatively, an uplink of a network switch may be coupled to a downlink of a gateway device or an access point, etc. A network access device may be an integrated device integrating two or more of these functionalities (e.g., router/gateway, access point, and/or network switch), wired and/or wireless.

Referring back to FIG. 8A, in one embodiment, management server 1001 works for both single and multi-tenant installations, meaning that multiple organizations (e.g., corporate clients) with different network administrators may have network access devices managed by the same management server, and network configuration or management can be performed using the same management server, but that are firewalled off from each other and do not have access to each other's network configurations. In this example, network access devices 1002 and network access devices 1003 may be associated with or owned by the different organizations and administrated by different network administrators 1007A and 1007B associated with the organizations. Some of network access devices 1002 may communicate with each other to form a local mesh network, while some of network access devices 1003 may communicate with each other to form another local mesh network.

According to one embodiment, management server 1001 includes a management module 1010 and a configuration module 1011 to manage and to configure network access devices 1002-1003 and to generate management server configuration information for each of network access devices 1002-1003, which may be stored in configuration information database 1013. In one embodiment, management server 1001 provides a user interface 1014 such as a Web interface to allow a network administrator such as administrators 1007A and 1007B to create and log into an account associated with an organization to which the network access devices 1002 or network access devices 1003 belong.

The management server 1001 further includes a NAD information database 1012, including information regarding the network access devices 1002-1003. In one embodiment, the NAD information database 1012 includes a serial number and a mechanism to authenticate the network access device's identity (e.g., the public key of a private public key pair, the private key of which was embedded or stored in the network access device during the manufacturing). NAD information database 1012 may be populated different ways in different embodiments (e.g., populated by the seller of the network access devices, populated by the network administrator). In embodiments in which this information is populated by the seller, different ones of these embodiments may associate the information regarding network access devices 1002-1003 in the router information database with the user account in different ways (example, network administrators 1007A and 1007B may provide an order number (or invoice number) associated with a purchase of network access devices 1002 or 1003).

According to one embodiment, when a network access device is powered up and attempts entering network 1004, the network access device attempts to contact management server 1001. In one embodiment, certain device information such as an IP address and domain name service (DNS) name of management server 1001 is stored in the network access device when it is manufactured. In one embodiment, when the network access device is powered up, the network access device performs any self configuration processes including obtaining an IP address for itself from a dynamic host configuration protocol (DHCP) facility (which address may be a public IP address, or may be a private IP address if there is a device performing NAT between the router and the WAN (that is to say, the network access device is behind a device performing NAT)). The network access device then accesses management server 1001 based on the server's IP address and authenticates itself (e.g., signing a message (e.g., including the serial number of the network access device) using a private key associated (and/or stored) with the network access device, such that management server 1001 can authenticate the network access device using the associated public key (stored in NAD information database 1012) maintained by management server 1001).

In one embodiment, each of network access devices 102-103 creates one or more secure communication channels (e.g., a control tunnel) with server 1001 using the keys downloaded from management server 101 to exchange control traffic such as management messages or notification, operating statuses of the network access device, etc. Such a tunnel for network management purposes is referred to herein as an mTunnel. In this example, network access devices 1002 maintain at least one mTunnel 1021 with management server 1001 and network access devices 1003 maintain at least one mTunnel 1022 with management server 1001. In one embodiment, each of network access devices 1002 may maintain a persistent mTunnel with management server 1001. Alternatively, only the network access device operating as a gateway device maintains an mTunnel with management server 1001, while other network access devices behind the gateway device communicate with the gateway device to share the same mTunnel. In one embodiment, a network access device operating as a gateway performs network address translation (NAT) for its clients, which may be a network client device or another network access device.

In one embodiment, once a network access device has been successfully authenticated by server 1001, the network access device downloads configuration information and stores it in a storage device within the network access device. This download may take place over a secure session layer (SSL)-encrypted session and/or the management server may encrypt the data using the public key corresponding to the private key. This secure channel may also be used to receive subsequent configuration updates from management server 1001. According to one embodiment, subsequently, when there is a change in the configuration, such as adding or removing a network access device, changing of subnet settings (for example, by an administrator such as administrators 1007A and 1007B via a Web interface of management server 1001), management server 1001 is to generate updated configuration information and communicate the updates to the network access devices via their corresponding mTunnels (such communication can be done with different mechanisms depending on the embodiment of type of information, including a push mechanism, a pull mechanism, etc.).

A variety of tunneling protocols can be utilized over an mTunnel between a network access device and management server 1001, such as, for example, Internet protocol (IP) over user datagram protocol (UDP) (IP/UDP) encapsulation. UDP is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an IP protocol network without requiring prior communications to set up special transmission channels or data paths. UDP uses a simple transmission model without handshaking dialogues for providing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP), which is designed for this purpose. UDP applications use datagram sockets to establish host-to-host communications. An application binds a UDP socket to its endpoint of data transmission, which is a combination of an IP address and a UDP port.

For example, a network management message may be carried as an IP packet and the IP packet may be encapsulated within a UDP packet exchanged between a network access device and management server 1001 over a respective mTunnel. In one embodiment, an IP packet having one or more network management messages embedded therein may be wrapped with a predetermined mTunnel header and is transmitted within a UDP packet between management server 1001 and a network access device, even if the network access device is behind a NAT device.

In some configurations, if a network access device is behind a firewall that does not allow any UDP packet going through, a UDP packet carrying a network management message may be encapsulated within a hypertext transport protocol (HTTP), referred to herein as UDP over HTTP (UDP/HTTP). Since most of the firewalls allow Internet traffic using HTTP protocol with a transport control protocol (TCP) port of 80, it is likely a UDP packet embedded within an HTTP packet having a destination TCP port of 80 or port 443 can reach management server 1001. In such a configuration, when management server 1001 receives the HTTP packet, it may remove any HTTP header to reveal a UDP packet encapsulated therein. Thereafter, an IP packet encapsulated within the UDP packet may be extracted and the network management message within the IP packet can be obtained.

According to one embodiment, management server 1001 and network access devices associated with an organization such as network access devices 1002 may utilize an internal set of IP addresses (also referred to as mTunnel or management IP addresses) to exchange network management messages via the respective mTunnel or mTunnels. That is, the internal IP addresses used by management server 1001 and network access devices 1002 via the respective mTunnel or mTunnels may be in a separate IP address space (e.g., 6.x.x.x) that is different from an IP address space used between network access devices 1002 and their network client devices 1008 over LAN(s) 1005 (e.g., 10.x.x.x). The internal IP addresses described herein are only used between management server 1001 and network access devices 1002 to exchange network management messages over the respective mTunnel(s). In one embodiment, for a network access device that performs NAT for its LAN devices, it may have at least three IP addresses: 1) an uplink IP address for regular network traffic to an external network (e.g., external IP address used in the external network, or a public IP address if the uplink interface of the network access device is directly coupled to the Internet; 2) a downlink IP address (e.g., a private IP address used between the network access device and its LAN devices); and 3) an internal IP address (e.g., a management IP address or mTunnel IP address) solely used between a management server and the network access device via an mTunnel over the Internet for the purpose of exchanging network management messages. In this example, management server 1001 and network access devices 1002 using the internal IP addresses to exchange network management messages over mTunnel(s) 1021 forms a logical network 1023 (e.g., a logical management network).

Similarly, management server 1001 and network access devices 1003 of another organization in this example may utilize a different set of internal IP addresses to exchange network management messages through the respective mTunnel or mTunnels, where the internal IP addresses may be in a different IP address space than the one of IP addresses used between network access devices 1003 and their client devices 1009. Similarly, in this example, management server 1001 and network access devices 1003 using internal IP addresses to exchange network management messages over mTunnel(s) 1022 forms a logical network 1024 (e.g., a logical management network). The internal IP addresses (referred to herein as a first set of internal IP addresses) used between management server 1001 and network access devices 1002 may be different than the internal IP addresses (referred to herein as a second set of internal IP addresses). The first and second sets of internal IP addresses may be in different IP address spaces or in the same IP address space dependent upon the specific configuration.

According to one embodiment, when a network access device is powered up and initialized, the network access device performs certain self-configuration operations to determine whether the network access device should operate as a gateway or as an access point behind a gateway. In one embodiment, when a network access device boots up, it initializes its Ethernet interface and attempts to request an IP address (e.g., a publicly accessible IP address over the Internet, also referred to as an uplink IP address) by broadcasting its media access control (MAC) address within a dynamic host configuration protocol (DHCP) request via its Ethernet interface. If the Ethernet interface of this network access device is connected to the Internet, a DHCP server, which may be a separate server or part of management server 1001, will respond with a valid IP address assignment, and the network access device will operates as a gateway device. If there is no DHCP response received within a predetermined period of time, the network access device assumes that it is operating behind another gateway device that performs NAT, and the network access device then joins an existing network and operates as an access point.

According to one embodiment, when operating behind a gateway, each of the network access devices derives its own IP address and assigns IP addresses to its client devices using a predetermined method in a consistent manner. In one embodiment, a network access device performs a hash operation on at least a portion of its hardware identifier such as a MAC address to generate an IP address. In a particular embodiment, a network access device hashes its 6-byte MAC address using a predetermined hash function (e.g., CRC-32 hash function) to generate lower three bytes of its IP address. Note that each of the network access devices may generate two IP addresses for itself: 1) an internal IP address in a first IP address space (e.g., 6.x.x.x) solely for communicating network management messages with management server 1001 via an mTunnel; and 2) a private IP address in a second IP address space (e.g., 10.x.x.x) for normal network traffic with its client devices.

Similarly, when a network client device, such as client devices 1008, requests an IP address, the associated network access device hashes a MAC address of the client device to derive an IP address for the client device. Since each of the network access devices performs the same hash operation using the same hash function on a MAC address of a client device, the client device can consistently obtain the same IP address from different network access devices. As result, the client device can roam across different network access devices without having to change its IP address or to perform any address resolution protocol (ARP) related operations.

Referring back to FIG. 8A, as described above, network access devices 1002 and network access devices 1003 may be associated with different organizations and managed by management servers 1001. In other configurations, network access devices 1002 and network access devices 1003 may be associated with the same organization as shown as system 1000B in FIG. 8B. Referring to FIG. 8B, in this configurations, network access devices 1002 and network access devices 1003 may be deployed and located at different sites or geographical locations of the organization. According to one embodiment, at least one virtual private network (VPN) tunnel 1025 is maintained between at least one of network access devices 1002 and at least one of network access devices 1003, also referred to as a site-to-site VPN. Some or all of the network access devices can be configured, via configuration interface 1014, to participate in the site-to-site VPN.

FIG. 9 is a block diagram illustrating a network configuration in accordance with an embodiment of the invention. Network configuration 1100 may be implemented as part of network configurations as shown in FIG. 8A and FIG. 8B. The configuration of NADs 1101 represents one possible implementation of one of the LANs 1005 and 1006 of FIG. 8A and FIG. 8B, such as the one including an access network, where one or more of NADs 1101 are in accordance with embodiments of the present invention. That is, any of the routers (e.g., 1102, 1104, 1108 and 1110), network switches (e.g., 1112-1114), and wireless access points (e.g., 1118-1128) shown in FIG. 9 may be implemented by way of the previously described network access devices, including NADs 1002 and 1003 of FIG. 8A and FIG. 8B. FIG. 9 illustrates the complexity and variety of possible configurations that may need to be accounted for by a system administrator (e.g., admin 1112) when configuring a network access device within LAN 1104. For example, LAN 1104 includes multiple gateways to WAN 1110, multiple VLANs, and multiple possible paths to WAN 1110 by many of the NADs 1101. A change in one of the NADs 1101 may require complex configuration changes to one or more of the downstream NADs. To be sure, a configuration change or fault in wireless access point 1120 may result in required configuration changes to wireless access points 1122 and 1118, and network switches 1112 and 1114. Similarly, a configuration change or fault in router 1108 may result in required configuration changes to wireless access points 1126, 1128, and 1124, network switches 1116 and 1114, and router 1110. As is apparent, manual configuration of the network access devices in a network such as LAN 1104 can be complex and extremely error prone. Furthermore, changes to LAN 1104 resulting is a loss of network connectivity may be difficult to diagnose and troubleshoot. Accordingly, embodiments of the present invention disclose allow for an installer to install one or more of NADs 1101 by simply powering on the device and connecting a cable. Then, the NAD may automatically establish a connection to WAN 1110, such that Administrator 1112 may remotely configure NAD 1102 by way of management server 1114. Furthermore, NADs 1101 may be configured to periodically test their connection to WAN 1110 and if it is lost, to automatically establish a new connection to WAN 1110, so as to reduce down time of LAN 1104.

Some portions of the preceding detailed descriptions have been presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the ways used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the above discussion, it is appreciated that throughout the description, discussions utilizing terms such as those set forth in the claims below, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

The techniques shown in the figures can be implemented using code and data stored and executed on one or more electronic devices. Such electronic devices store and communicate (internally and/or with other electronic devices over a network) code and data using computer-readable media, such as non-transitory computer-readable storage media (e.g., magnetic disks; optical disks; random access memory; read only memory; flash memory devices; phase-change memory) and transitory computer-readable transmission media (e.g., electrical, optical, acoustical or other form of propagated signals—such as carrier waves, infrared signals, digital signals).

The processes or methods depicted in the preceding figures may be performed by processing logic that comprises hardware (e.g. circuitry, dedicated logic, etc.), firmware, software (e.g., embodied on a non-transitory computer readable medium), or a combination of both. Although the processes or methods are described above in terms of some sequential operations, it should be appreciated that some of the operations described may be performed in a different order. Moreover, some operations may be performed in parallel rather than sequentially.

In the foregoing specification, embodiments of the invention have been described with reference to specific exemplary embodiments thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense. 

What is claimed is:
 1. A system for streaming packet captures over the Internet, comprising: a plurality of network access devices, each operating as one of a gateway device, a wireless access point, and a network switch, wherein each of the network access devices provides network access to a plurality of client devices over a local area network (LAN), wherein each of the network access devices operating as a gateway device performs network address translation (NAT) for client devices currently associated with; and a management server communicatively coupled to the network access devices over the Internet for managing the network access devices, wherein the management server maintains a persistent hypertext transport protocol (HTTP) connection with each of the network access devices over the Internet, wherein the management server is configured to generate a bytecode based on a filtering expression for packet captures (PCAPs), the bytecode representing one or more PCAPs filtering rules, transmit the bytecode to at least a portion of the network access devices without requiring the network access devices to compile the PCAPs filtering rules, receive PCAPs from at least a portion of the network access devices, wherein the PCAPs were captured by the network access devices based on the PCAPs filtering rules and streamed over the Internet via the HTTP connections between the management server and the network access devices, and merge the PCAPs received from the network access devices into merged PCAPs.
 2. The system of claim 1, wherein the management server includes a Web interface to provide a set of network management tools to allow a user to configure the network access devices over the Internet, and wherein the filtering expression is received from the user via the Web interface to specify how the PCAPs are to be captured.
 3. The system of claim 1, wherein each of the network access devices includes an HTTP server component running therein that communicates with an HTTP client component running within the management server to maintain the HTTP connection, respectively.
 4. The system of claim 3, wherein the PCAPs are streamed from the HTTP server components of the network access devices to the HTTP client component using an HTTP streaming protocol in which the PCAPs are transported in a plurality of HTTP chunks.
 5. The system of claim 1, wherein each of the network access devices is configured to listen to a downlink LAN interface that is specified by the bytecode downloaded from the management server over the Internet, capture packets exchanged by one or more client devices through the downlink LAN interface, generate PCAP information from the captured packets based on one or more PCAP filtering rules specified by the bytecode, and stream the PCAP information to the management server via the respective HTTP connection.
 6. The system of claim 1, wherein a PCAP stream received from a network access device includes a PCAP header and a plurality of PCAP packets as a payload of the PCAP stream, and wherein the PCAP header includes a first timestamp indicating time when a PCAP process of the network access device started.
 7. The system of claim 6, wherein each of the PCAP packets includes a second timestamp indicating time when the corresponding PCAP packet was captured by the network access device.
 8. The system of claim 7, wherein the management server is to reorder a plurality of PCAP streams received from the network access devices based on the first timestamp in each of the PCAP streams in generating the merged PCAPs.
 9. The system of claim 8, wherein the management server is to further reorder the PCAP packets of the PCAP streams in view of the second timestamp in each of the PCAP packet in generating the merged PCAPs.
 10. A method for streaming packet captures over the Internet, comprising: maintaining, by a management server, a persistent hypertext transport protocol (HTTP) connection with each of a plurality of network access devices over the Internet, each network access device operating as one of a gateway device, a wireless access point, and a network switch, wherein each of the network access devices provides network access to a plurality of client devices over a local area network (LAN), wherein each of the network access devices operating as a gateway device performs network address translation (NAT) for client devices currently associated with; generating, by the management server, a bytecode based on a filtering expression for packet captures (PCAPs), the bytecode representing one or more PCAPs filtering rules; transmitting the bytecode to at least a portion of the network access devices without requiring the network access devices to compile the PCAPs filtering rules; receiving PCAPs from at least a portion of the network access devices, wherein the PCAPs were captured by the network access devices based on the PCAPs filtering rules and streamed over the Internet via the HTTP connections between the management server and the network access devices; and merging the PCAPs received from the network access devices into merged PCAPs.
 11. The method of claim 10, wherein further comprising: providing a Web interface to provide a set of network management tools to allow a user to configure the network access devices over the Internet; and receiving the filtering expression from the user via the Web interface to specify how the PCAPs are to be captured.
 12. The method of claim 10, wherein each of the network access devices includes an HTTP server component running therein that communicates with an HTTP client component running within the management server to maintain the HTTP connection, respectively.
 13. The method of claim 12, wherein the PCAPs are streamed from the HTTP server components of the network access devices to the HTTP client component using an HTTP streaming protocol in which the PCAPs are transported in a plurality of HTTP chunks.
 14. The method of claim 10, wherein a PCAP stream received from a network access device includes a PCAP header and a plurality of PCAP packets as a payload of the PCAP stream, and wherein the PCAP header includes a first timestamp indicating time when a PCAP process of the network access device started.
 15. The method of claim 14, wherein each of the PCAP packets includes a second timestamp indicating time when the corresponding PCAP packet was captured by the network access device.
 16. The method of claim 15, further comprising reordering a plurality of PCAP streams received from the network access devices based on the first timestamp in each of the PCAP streams in generating the merged PCAPs.
 17. The method of claim 16, further comprising reordering the PCAP packets of the PCAP streams in view of the second timestamp in each of the PCAP packet in generating the merged PCAPs.
 18. A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform a method of streaming packet captures over the Internet, the method comprising: maintaining, by a management server, a persistent hypertext transport protocol (HTTP) connection with each of a plurality of network access devices over the Internet, each network access device operating as one of a gateway device, a wireless access point, and a network switch, wherein each of the network access devices provides network access to a plurality of client devices over a local area network (LAN), wherein each of the network access devices operating as a gateway device performs network address translation (NAT) for client devices currently associated with; generating, by the management server, a bytecode based on a filtering expression for packet captures (PCAPs), the bytecode representing one or more PCAPs filtering rules; transmitting the bytecode to at least a portion of the network access devices without requiring the network access devices to compile the PCAPs filtering rules; receiving PCAPs from at least a portion of the network access devices, wherein the PCAPs were captured by the network access devices based on the PCAPs filtering rules and streamed over the Internet via the HTTP connections between the management server and the network access devices; and merging the PCAPs received from the network access devices into merged PCAPs.
 19. The non-transitory machine-readable medium of claim 18, wherein the method further comprises: providing a Web interface to provide a set of network management tools to allow a user to configure the network access devices over the Internet; and receiving the filtering expression from the user via the Web interface to specify how the PCAPs are to be captured.
 20. The non-transitory machine-readable medium of claim 18, wherein each of the network access devices includes an HTTP server component running therein that communicates with an HTTP client component running within the management server to maintain the HTTP connection, respectively.
 21. A method for streaming packet captures over the Internet, comprising: maintaining, by a network access device, a persistent hypertext transport protocol (HTTP) connection with a management server over the Internet, the network access device is one of a plurality of network access devices managed by the management server over the Internet, each of the network access devices operating as one of a gateway device, a wireless access point, and a network switch, wherein each of the network access devices provides network access to a plurality of client devices over a local area network (LAN), wherein each of the network access devices operating as a gateway device performs network address translation (NAT) for client devices currently associated with; downloading a bytecode representing one or more PCAPs filtering rules from the management server over the Internet, wherein the bytecode was generated by the management server based on a filtering expression without requiring the network access device to compile the bytecode; listening to a downlink LAN interface that is specified by the bytecode downloaded from the management server over the Internet; capturing packets exchanged by one or more client devices through the downlink LAN interface; generating PCAP information from the captured packets based on one or more PCAP filtering rules specified by the bytecode; and streaming the PCAP information to the management server via the persistent HTTP connection.
 22. The method of claim 21, wherein each of the network access devices maintains a persistent HTTP connection with the management server over the Internet to respectively stream PCAPs to the management server, and wherein the management server merges the PCAPs received from the network access devices into a merged PCAP stream.
 23. The method of 22, wherein the persistent HTTP connection is maintained by an HTTP server component running within the network access device and an HTTP client component running within the management server.
 24. A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform a method of streaming packet captures over the Internet, the method comprising: maintaining, by a network access device, a persistent hypertext transport protocol (HTTP) connection with a management server over the Internet, the network access device is one of a plurality of network access devices managed by the management server over the Internet, each of the network access devices operating as one of a gateway device, a wireless access point, and a network switch, wherein each of the network access devices provides network access to a plurality of client devices over a local area network (LAN), wherein each of the network access devices operating as a gateway device performs network address translation (NAT) for client devices currently associated with; downloading a bytecode representing one or more PCAPs filtering rules from the management server over the Internet, wherein the bytecode was generated by the management server based on a filtering expression without requiring the network access device to compile the bytecode; listening to a downlink LAN interface that is specified by the bytecode downloaded from the management server over the Internet; capturing packets exchanged by one or more client devices through the downlink LAN interface; generating PCAP information from the captured packets based on one or more PCAP filtering rules specified by the bytecode; and streaming the PCAP information to the management server via the persistent HTTP connection.
 25. The non-transitory machine-readable medium of claim 24, wherein each of the network access devices maintains a persistent HTTP connection with the management server over the Internet to respectively stream PCAPs to the management server, and wherein the management server merges the PCAPs received from the network access devices into a merged PCAP stream.
 26. The non-transitory machine-readable medium of 25, wherein the persistent HTTP connection is maintained by an HTTP server component running within the network access device and an HTTP client component running within the management server. 